//
//  AccountAndSafetyTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 16/9/12.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "AccountAndSafetyTableViewCell.h"

@implementation AccountAndSafetyTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.lbl_name = [[UILabel alloc] init];
    self.lbl_name.textColor = [UIColor blackColor];
    self.lbl_name.font = [UIFont systemFontOfSize:17];
    [self.contentView addSubview:self.lbl_name];
    
    //
    self.icon_return = [[UIImageView alloc] init];
    self.icon_return.image = [UIImage imageNamed:@"rigth-return.png"];
    [self.contentView addSubview:self.icon_return];
    self.icon_return.hidden = YES;
    
    //
    self.lbl_tel = [[UILabel alloc] init];
    self.lbl_tel.textColor = [UIColor grayColor];
    self.lbl_tel.font = [UIFont systemFontOfSize:13];
    self.lbl_tel.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:self.lbl_tel];
    self.lbl_tel.hidden = YES;
    
    //
    self.switch_right = [[UISwitch alloc] init];
    [self.contentView addSubview:self.switch_right];
    self.switch_right.hidden = YES;
    
    //
    self.view_Line = [[UIView alloc] init];
    self.view_Line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.view_Line];
    self.view_Line.hidden = YES;
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.lbl_name.frame = CGRectMake(15, 15, 200, 20);
    
    self.icon_return.frame = CGRectMake(SCREEN_WIDTH - 5 - 20, 15, 20, 20);
    
    self.lbl_tel.frame = CGRectMake(SCREEN_WIDTH - 25 - 3 - 150, 15, 150, 20);
    
    self.switch_right.frame = CGRectMake(SCREEN_WIDTH - 50 - 10, 10, 50, 44);
    
    self.view_Line.frame = CGRectMake(0, 49, SCREEN_WIDTH, 1);
}




















@end
